Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Exporting to text files

Elif, check back. I will post an answer here when I am finished with it. The solution I ended up using does export the rich text but it's still rough - I will post the full solution here.

Meanwhile, must your output be .txt files? If so, you may be able to base your code somewhat on this. I just whipped this up in Notepad - I haven't tested it! But it is an idea! You will have to add error trapping and account for the fact that emails can have many fields named Body... Good luck!


Trish


Sub Initialize
Dim session As New NotesSession
Dim db as NotesDatabase
Dim dc as NotesDocumentCollection
Dim doc as NotesDocument
Dim fileNum As Integer
Dim fileName As String
Dim strFilePathSource As String
Dim rtitem as NotesRichTextItem

Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments

For n = 0 to dc.count

Set doc = dc.GetNthDocument(n)
Set rtitem = doc.GetFirstItem("Body")

fileNum% = FreeFile()
fileName$ = "C:\Temp\yourfilename" + Cstr(n) + ".txt" '<--should obviously be unique
Open fileName$ For Output As fileNum
Write #fileNum%,"First line of text or a value here"
Write #fileNum%, rtitem.GetUnformattedText
Close fileNum%

Set doc = nothing

Next

End Sub


Feedback response number WEBB8V7TSF created by ~Phil Ekavitch on 06/12/2012

How to do backend lotusscript expor... (~Umberto Quetwe... 31.May.12)
. . Intractable problem I think... (~Tip Opjipymanl... 1.Jun.12)
. . . . Will you look at my code? (~Umberto Quetwe... 1.Jun.12)
. . Update: Now it can be in UI but thi... (~Umberto Quetwe... 1.Jun.12)
. . notesstream (~Hank Quetrepul... 31.May.12)
. . . . NotesStream (~Umberto Quetwe... 1.Jun.12)
. . . . . . Exporting to plain text (~Denise Chutoog... 12.Jun.12)
. . . . . . . . Exporting to text files (~Umberto Quetwe... 12.Jun.12)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS